<?php

/**
 * Cumpleanyos form.
 *
 * @package    Sanitas
 * @subpackage form
 * @author     Jose Antonio Sánchez Bedoya
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class CumpleanyosForm extends BaseCumpleanyosForm
{
public function configure()
  {
      $this->useFields(array('id','asunto', 'texto', 'idioma'));
      
     //Following code will remove Required validators from these fields.
     unset($this->validatorSchema['created_at']);
     unset($this->validatorSchema['updated_at']);
     unset($this->validatorSchema['validated_at']);
     unset($this->validatorSchema['is_validated']);
     unset($this->validatorSchema['removed_at']);
     unset($this->validatorSchema['remove_it']); 

     //following code will remove fields from form
     unset($this->widgetSchema['created_at']);
     unset($this->widgetSchema['updated_at']);     
     unset($this->widgetSchema['validated_at']);
     unset($this->widgetSchema['is_validated']);
     unset($this->widgetSchema['removed_at']);
     unset($this->widgetSchema['remove_it']);
     
     //$this->validatorSchema['asunto'] = new sfValidatorString(array('max_length' => 100, 'required' => true));
     $this->widgetSchema['idioma'] = new sfWidgetFormInput(array(),array('readonly'=>'readonly'));
     $this->widgetSchema['texto'] = new sfWidgetFormTextareaTinyMCE(array(
            'width'  => 600,
            'height' => 300,
            'config' => 'theme_advanced_disable: "anchor,image,cleanup,help",
                theme_advanced_buttons1 : "bold,italic,underline,strikethrough,separator,bullist,numlist,separator,sub,sup,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,fontselect,fontsizeselect,forecolor,backcolor,separator,code"',
        ));
  }
}
